#ifndef INC_UNI_NLU_CONTENT_H_
#define INC_UNI_NLU_CONTENT_H_

typedef struct {
  uni_u32 key_word_hash_code; /* 存放识别词汇对应的hashcode */
  uni_u8  nlu_content_str_index; /* 存放nlu映射表中的索引，实现多个识别词汇可对应同一个nlu，暂支持256条，如果不够换u16 */
  char    *hash_collision_orginal_str /* 类似Java String equal，当hash发生碰撞时，赋值为识别词汇，否则设置为NULL */;
} uni_nlu_content_mapping_t;

enum {
  eCMD_wakeup_uni,
  eCMD_text1,
  eCMD_text2,
  eCMD_text3,
  eCMD_text4,
  eCMD_text5,
  eCMD_volumeUpUni,
  eCMD_volumeDownUni,
  eCMD_volumeMaxUni,
  eCMD_volumeMidUni,
  eCMD_volumeMinUni,
};

const char* g_nlu_content_str[] = {
[eCMD_wakeup_uni] = "{\"asr_recongize\":\"小布小布\",\"text\":\"小布小布\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"wakeup_uni\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[103]\"}}",
[eCMD_text1] = "{\"asr_recongize\":\"换尿片\",\"text\":\"换尿片\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"text1\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[]\"}}",
[eCMD_text2] = "{\"asr_recongize\":\"准备睡觉\",\"text\":\"准备睡觉\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"text2\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[]\"}}",
[eCMD_text3] = "{\"asr_recongize\":\"游戏床模式\",\"text\":\"游戏床模式\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"text3\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[]\"}}",
[eCMD_text4] = "{\"asr_recongize\":\"小布开灯\",\"text\":\"小布开灯\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"text4\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[]\"}}",
[eCMD_text5] = "{\"asr_recongize\":\"小布关灯\",\"text\":\"小布关灯\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"text5\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[]\"}}",
[eCMD_volumeUpUni] = "{\"asr_recongize\":\"增大音量\",\"text\":\"增大音量\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"volumeUpUni\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[104]\"}}",
[eCMD_volumeDownUni] = "{\"asr_recongize\":\"减小音量\",\"text\":\"减小音量\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"volumeDownUni\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[104]\"}}",
[eCMD_volumeMaxUni] = "{\"asr_recongize\":\"最大音量\",\"text\":\"最大音量\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"volumeMaxUni\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[104]\"}}",
[eCMD_volumeMidUni] = "{\"asr_recongize\":\"中等音量\",\"text\":\"中等音量\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"volumeMidUni\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[104]\"}}",
[eCMD_volumeMinUni] = "{\"asr_recongize\":\"最小音量\",\"text\":\"最小音量\",\"service\":\"cn.yunzhisheng.setting\",\"semantic\":{\"intent\":{\"operations\":[{\"cmd\":\"volumeMinUni\"}]}},\"general\":{\"type\":\"T\",\"text\":\"\",\"pcm\":\"[104]\"}}",
};

/*TODO perf sort by hashcode O(logN), now version O(N)*/
const uni_nlu_content_mapping_t g_nlu_content_mapping[] = {
  {2713994200U/*小布小布*/, eCMD_wakeup_uni, NULL},
  {1466599480U/*嘿小布*/, eCMD_wakeup_uni, NULL},
  {1996695276U/*换尿片*/, eCMD_text1, NULL},
  {498046627U/*尿布台模式*/, eCMD_text1, NULL},
  {431632056U/*最高档位*/, eCMD_text1, NULL},
  {1996694807U/*换尿布*/, eCMD_text1, NULL},
  {3942006531U/*准备睡觉*/, eCMD_text2, NULL},
  {347243203U/*睡床模式*/, eCMD_text2, NULL},
  {1487616535U/*拼床模式*/, eCMD_text2, NULL},
  {701189319U/*游戏床模式*/, eCMD_text3, NULL},
  {4213637433U/*学步模式*/, eCMD_text3, NULL},
  {1899682519U/*最低档位*/, eCMD_text3, NULL},
  {2724629848U/*小布开灯*/, eCMD_text4, NULL},
  {3421717457U/*打开夜灯*/, eCMD_text4, NULL},
  {3447216717U/*打开灯光*/, eCMD_text4, NULL},
  {2675355534U/*小布关灯*/, eCMD_text5, NULL},
  {2480644484U/*关闭夜灯*/, eCMD_text5, NULL},
  {2506143744U/*关闭灯光*/, eCMD_text5, NULL},
  {642591547U/*增大音量*/, eCMD_volumeUpUni, NULL},
  {182008939U/*减小音量*/, eCMD_volumeDownUni, NULL},
  {268918386U/*最大音量*/, eCMD_volumeMaxUni, NULL},
  {3607692158U/*中等音量*/, eCMD_volumeMidUni, NULL},
  {4177521358U/*最小音量*/, eCMD_volumeMinUni, NULL},
};

#endif
